package cn.yeziji.forum.common.enums;

import cn.yeziji.forum.common.ResultCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 论坛状态
 *
 * @author gzkemays
 * @since 2021/12/22 14:33
 */
@Getter
@AllArgsConstructor
public enum ForumCommonStatus {
  /** 状态返回 */
  REQUEST_SUCCESS(ResultCode.OK, "请求成功"),
  HTTP_REQ_NOT_SUPPORTED(ResultCode.METHOD_ERROR, "请求类型错误"),
  FAIL(ResultCode.REQUEST_FAIL, "请求失败"),
  DATA_ERROR(ResultCode.DATA_ERROR, "请求数据异常"),
  REQ_ERROR_SUPPORT(ResultCode.HTTP_ERROR, "HTTP请求异常"),
  SQL_ERROR(ResultCode.SQL_ERROR, "数据库异常"),
  SQL_OPERA_ERROR(ResultCode.SQL_OPERA_ERROR, "数据库操作异常"),
  UNKNOWN_ERROR(ResultCode.UNKNOWN_ERROR, "未知异常"),
  NULL_POINTER_ERROR(ResultCode.NULL_POINT_ERROR, "空指针异常"),
  ILLEGAL_ARGS_ERROR(ResultCode.ARGS_ERROR, "参数异常"),
  SECURITY_PWD_ERROR(ResultCode.SECURITY_ERROR, "security加密异常"),
  TOKEN_ERROR(ResultCode.TOKEN_ERROR, "Token 令牌不正确"),
  LOGIN_SUCCESS(ResultCode.OK, "登录成功"),
  LOGIN_FAIL(ResultCode.USER_LOGIN_FAIL, "登录失败"),
  LOGIN_NULL(ResultCode.USER_NOT_LOGIN, "请先登录后重试");
  int code;
  String msg;
}
